#include <Python.h>
#include <sys/ioctl.h>
#include <linux/kd.h>
#include <fcntl.h>
#include <signal.h>

#define delay1 50000
#define delay2 20000

int main(int argc, char **argv);
PyMODINIT_FUNC initled(void);

static PyObject *led_set(PyObject *self, PyObject *args);
static PyObject *led_on(PyObject *self, PyObject *args);
static PyObject *led_off(PyObject *self, PyObject *args);
static PyObject *led_toggle(PyObject *self, PyObject *args);

static PyMethodDef ledmethods[] = {
  /* "python method name", method handler, parameter type for hander, "document string" */
  { "set", led_set, METH_VARARGS, "Set led's" },
  { "on", led_on, METH_VARARGS, "Turn on led's" },
  { "off", led_off, METH_VARARGS, "Turn off led's" },
  { "toggle", led_toggle, METH_VARARGS, "Toggle led's" },
  /* Array end indicator */
  { NULL, NULL, 0, NULL }
};
